package org.apache.lucene.ocean;

import java.io.IOException;

import org.apache.lucene.ocean.util.OceanRandomAccessFile;

/**
 * LogDirectory was created to give access to the RandomAccessFile.  Using
 * Lucene's Directory implementation was not suitable because the input and output
 * streams cannot be used concurrently.
 *
 */
public abstract class LogDirectory {
  public abstract String[] list() throws IOException;

  public abstract boolean fileExists(String name) throws IOException;

  public abstract long fileModified(String name) throws IOException;

  public abstract boolean deleteFile(String name) throws IOException;

  public abstract long fileLength(String name) throws IOException;
  
  public abstract OceanRandomAccessFile openInput(String name) throws IOException;
  
  public abstract OceanRandomAccessFile getOutput(String name, boolean overwrite) throws IOException;
}
